package cell

import (
	"errors"
	"kop/pb"
)

type Cells []*pb.Cell

func (c Cells) GetCell(x, y int32) *pb.Cell {

	for _, cell := range c {
		if cell.X == x && cell.Y == y {
			return cell
		}
	}

	panic(errors.New("wrong coordinates"))
}
